package main

import "fmt"

// Author : CSR丶WARRIOR
// Time ： 2020/10/13  10:42
// TOOLS : GoLand
// FILENAME : Array assignment.go
// STATEMENT: 数组赋值

func main() {
	/*var num [5]int
	num[1] = 32
	num[3] = 24
	fmt.Println(num) //[0 32 0 24 0]*/

	//循环方式赋值
	var nums [5]float64
	for i := 0; i < len(nums); i++ {
		nums[i] = float64(i+1) * 1.26
	}
	fmt.Println(nums)
	//[1.26 2.52 3.7800000000000002 5.04 6.3]
}
